import QtQuick 2.2
import QtQuick.Window 2.1

Window {
    visible: true
    width: 360
    height: 360

    Component {
        id: colorPicker;
        Rectangle{
            width: 80;
            height: 40;
        }
    }

    Loader {
        id: redPicker;
        sourceComponent: colorPicker;
        anchors.bottom: parent.bottom;
        anchors.bottomMargin: 10;
        anchors.left: parent.left;
        anchors.leftMargin: 10;
        onLoaded: {
            item.color = "pink";
        }
    }

    Loader {
        id: bluePicker;
        sourceComponent: colorPicker;
        anchors.left: redPicker.right;
        anchors.leftMargin: 10;
        anchors.verticalCenter: redPicker.verticalCenter;
        onLoaded: {
            item.color = "skyblue";
        }
    }
}
